Loading...
 

MATLAB implementation of the alpha scheme for the heat transfer problem

Below you can find a link to the MATLAB code performing simulations for the alpha scheme for the two-dimensional heat transport problem.

In line 621 we enter the time step size \( dt=0.01 \), in line 622 we enter the parameter
\( alpha=0.5 \), where alpha=0 means explicit Euler, alpha=1 implicit Euler, and alpha=0.5 means Cranck-Nicolson scheme.
In line 623 we specify the time steps number
\( K = 20; \)

The code execution is also possible in the free Octave(external link) environment.
Download code(external link) or see Appendix 7.

The code is activated by opening it in Octave and typing a command
\( heat\_time \)
During operation, the code prints successive time steps
Iter 1, t = 0.010000
Iter 2, t = 0.020000
Iter 3, t = 0.030000
...
The code generates a file at any time in the current directory out_*.png, e.g.
out_0.png
out_1.png
out_2.png
...
containing solutions from individual time steps.


Ostatnio zmieniona Wtorek 09 z Listopad, 2021 12:40:47 UTC Autor: Maciej Paszynski
Zaloguj się/Zarejestruj w OPEN AGH e-podręczniki
Czy masz już hasło?

Hasło powinno mieć przynajmniej 8 znaków, litery i cyfry oraz co najmniej jeden znak specjalny.

Przypominanie hasła

Wprowadź swój adres e-mail, abyśmy mogli przesłać Ci informację o nowym haśle.
Dziękujemy za rejestrację!
Na wskazany w rejestracji adres został wysłany e-mail z linkiem aktywacyjnym.
Wprowadzone hasło/login są błędne.